#pragma once
#include <oratypes.h>
#include <orl.h>



class DBTOOLS
{
public:
	DBTOOLS(void);
	~DBTOOLS(void);

	static void CopyPropertyValue(char **pInternal,char *pExternal);
	static sb4 GetSizeFromOraDataType(ub2 OraDataType,void *VarValue);
	static char* ConvertWCHAR2CHAR(char *source);
	static void GetDBVersion(char* ClientVer,char* ServerVer);
	static bool ConvertNumberToID(OCIError* pErr,OCINumber *pNum,unsigned __int64& val);

	//pNum		:input OCInumber
	//ValSize	:size of target value in byte
	//bSigned	:if the target value is signed or unsigned
	//pVal		:target value pointer
	static bool ConvertNumberToInt(OCIError* pErr,OCINumber *pNum,unsigned int ValSize,bool bSigned,void* pVal);

	static bool ConvertNumberToDouble(OCIError* pErr,OCINumber *pNum,unsigned int ValSize,void* pVal);

};

